home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / M / Monitor.cpt / Monitor ReadMe < prev    next >
Text File  |  1990-01-09  |  8KB  |  161 lines

  1. ===========================================================================
  2. "Monitor"     An Asynchronous Serial Line Monitor Program For The Macintosh
  3. ===========================================================================
  4.  
  5.                         Version 1.0 (12-Dec-89)
  6.  
  7.  
  8. ___________________________________________________________________________
  9. INTRODUCTION
  10.  
  11. "Monitor" monitors the two serial input lines (modem and printer port) of
  12. the Macintosh and dumps the results to a text file on disk. The purpose is
  13. to tap the receive and transmit lines of a serial asynchronous connection
  14. between two other devices (e.g. another Macintosh and a modem) and to see
  15. what is going on. This was especially useful for developing file transfer
  16. protocols for my terminal program "Terminal" (current version is 1.7).
  17.  
  18.  
  19. ___________________________________________________________________________
  20. WHAT YOU NEED
  21.  
  22. You need a spare Macintosh Plus (or newer) to be devoted exclusively to the
  23. serial line monitoring. It's better to use a hard disk, I have not tried to
  24. dump to diskettes. Then you should make a cable using the following picture
  25. as a guide. The pin assignments for the Macintosh can be found in "Apple
  26. Macintosh Family Hardware Reference". Modems generally use DB-25
  27. connecters. Use pins 2, 3 and 7.
  28.  
  29. "Monitor" was tested on a Macintosh Plus and a Macintosh IIcx using System
  30. 6.03. I made no attempt to stay compatible with earlier System versions. If
  31. you want to modify the sources you need the THINK C 3.02 compiler.
  32.  
  33.  
  34.     +----------+ TxD                             +----------+
  35.     |          O----------•------>---------------O          |
  36.     |          | RxD      |                      |          |
  37.     | Mac IIcx O-----------------<--•------------O  Modem   |
  38.     |          | Gnd      |         |            |          |
  39.     |          O---------------•-----------------O          |
  40.     +----------+          |    |    |            +----------+
  41.                               |    |    |
  42.         +----------+ RxD      |    |    |
  43.         | Modem    O------<---+    |    |
  44.         |     port | Gnd           |    |
  45.         |          O---------------•    |
  46.         | Mac Plus | RxD           |    |
  47.         |          |               |    |
  48.         | Printer  O------<-------------+
  49.         |     port | Gnd           |
  50.         |          O---------------+
  51.         +----------+
  52.  
  53.  
  54. ___________________________________________________________________________
  55. WHAT YOU GET
  56.  
  57. In fact you get two programs: "Monitor" and "Monitor Config". "Monitor" is
  58. the program to start monitoring the serial lines. "Monitor Config" is a
  59. program for modifying the parameters "Monitor" needs to run. As you see
  60. "Monitor Config" is bigger than "Monitor" proving again that the user
  61. interface is 80 percent of the work of a program.
  62.  
  63.  
  64. ___________________________________________________________________________
  65. MONITOR CONFIG
  66.  
  67. To configure "Monitor" start up "Monitor Config". A standard get file
  68. dialog appears. Find and select "Monitor" as the file to open. Then you get
  69. a dialog with the current parameters used by "Monitor".
  70.  
  71. File name:
  72. This will be the prefix of the TEXT file name "Monitor" will use when
  73. dumping the serial data to disk. "Monitor" will append a serial number to
  74. make sure no file gets deleted. The file will be created in the same folder
  75. from where "Monitor" was started. E.g. if you specify "Dump #" as file
  76. name, the first file created will be "Dump #1", then "Dump #2" and so on.
  77.  
  78. File creator:
  79. This is the TEXT file creator (4 characters) to be used, so that if you
  80. double click on a dump file your favorite TEXT editor is launched. Use
  81. "ResEdit" to check the creator of your TEXT editor. Remember that a dump
  82. file is plain TEXT, there is no need for a full fledged word processor, but
  83. your TEXT editor should be able to read large files (i.e. greater than
  84. 32000 characters).
  85.  
  86. Timeout:
  87. This value in ticks (there are 60.15 ticks per second) is used by "Monitor"
  88. to dump out one port. This means, that if after the timeout there are no
  89. new characters for a given port the characters collected in the input
  90. buffer are dumped out to the file.
  91.  
  92. Limit:
  93. This is the size in characters to be used as input buffer for the two
  94. ports. If the input buffer fills up to this limit it is dumped to the file.
  95.  
  96. Port A (modem) and port B (printer) settings:
  97. There are popup menus for selecting the speed, the number of data bits, the
  98. type of parity and the number of stop bits for each port. The two ports are
  99. completely independent one of each other. Note that the number of stop bits
  100. is not really necessary, the Zilog SCC inside the Macintosh will receive
  101. any number of stop bits, and the number of stop bits specified are used
  102. only for transmitting, but we are only receiving here.
  103.  
  104.  
  105. ___________________________________________________________________________
  106. MONITOR
  107.  
  108. As soon as "Monitor" is started it tries to open the two serial ports. This
  109. fails if AppleTalk is active, so make sure AppleTalk is disconnected
  110. ("Chooser" DA). Then "Monitor" puts up a Window with a "Stop" button and
  111. starts monitoring, dumping everything into a TEXT file on disk. To stop
  112. "Monitor" simply click on the "Stop" button or press any key while
  113. "Monitor"s window is active.
  114.  
  115. "Monitor" works as follows to monitor the two ports. It cyclically checks
  116. both ports. If anything is received it is first put into a buffer. If the
  117. buffer fills up it is dumped out to the file. If something is received on
  118. the other port the buffer is also dumped out first. If nothing is received
  119. for a certain time, and the buffer is not empty it is dumped out.
  120.  
  121. The output looks like this (this is the beginning of a CompuServe QuickB
  122. file upload, port B is CompusServe and I am port A):
  123.  
  124.   8455 B: 0D 0A 0A 55 70 6C 6F 61 64 69 6E 67 20 6D 61 69  ...Uploading mai
  125.   8566 B: 6C 0D 05                                         l..
  126.   8671 A: 10 2B 10 30                                      .+.0
  127.   8678 B: 10 42 31 2B 10 41 10 41 10 48 10 41 10 43 10 40  .B1+.A.A.H.A.C.@
  128.   8686 B: 10 54 10 40 D4 10 40 10 40 10 40 10 40 10 40 10  .T.@..@.@.@.@.@.
  129.   8694 B: 40 10 40 10 40 03 2B                             @.@.@.+
  130.   8791 A: 10 42 32 2B 01 01 08 01 01 03 5D                 .B2+......]
  131.   8826 B: 10 32 10 42 33 54 55 41 6D 61 69 6C 03 D5 A3     .2.B3TUAmail...
  132.   8833 A: 10 42 34 4E 54 6F 3A 20 3E 49 4E 54 45 52 4E 45  .B4NTo: >INTERNE
  133.   8841 A: 54 3A 61 6E 61 6D 61 72 69 61 40 76 69 6F 6C 65  T:anamaria@viole
  134.   8849 A: 74 2E 62 65 72 6B 65 6C 65 79 2E 65 64 75 0D 0A  t.berkeley.edu..
  135.   8859 A: 46 72 6F 6D 3A 20 45 72 6E 79 20 54 6F 6E 74 6C  From: Erny Tontl
  136.   8865 A: 69 6E 67 65 72 0D 0A 53 75 62 6A 3A 20 46 69 6C  inger..Subj: Fil
  137.  
  138. The first column gives the relative time in ticks (60.15 ticks per second)
  139. when the buffer was dumped to the file, this is not necessary the time when
  140. the characters were received. Then there is the port id: port A (modem) or
  141. port B (printer) followed by the hexadecimal representation of up to 16
  142. characters. In the right part is the 7 bit ASCII representation of the
  143. characters. Control characters show up as '.'.
  144.  
  145.  
  146. ___________________________________________________________________________
  147. COMMENTS AND SUGGESTIONS
  148.  
  149. Send any comments, bug reports and suggestions to my address:
  150.     Erny Tontlinger
  151.     33, route d'Arlon
  152.     L-8410 Steinfort
  153.     Luxembourg
  154. or via electronic mail to my CompuServe account 73720,2200 (this can also
  155. be done via Internet using the address 73720.2200@compuserve.com). I'am a
  156. radio amateur, so you can reach me via the packet radio network at LX1YZ @
  157. LX0PAC.
  158.  
  159. This program is absolutely free, including the C sources. So do with it
  160. what you like, but please include the documentation if you give it away.
  161.